﻿@{
    ViewBag.Title = "修改公告";
}
@section js{

    <script src="~/Scripts/CKEditor/ckeditor.js"></script>
}
<div style="width: 100%;">
    <div class="mini-toolbar" style="border-bottom: 0; padding: 0px;">
        <table style="width: 100%;">
            <tr>
                <td style="width: 100%;">
                    <a id="one" class="mini-button" iconcls="icon-save" plain="true" onclick="add()">保存</a>
                    <a id="two" class="mini-button" iconcls="icon-close" plain="true" onclick="close()">关闭</a>
                </td>
            </tr>
        </table>
    </div>
</div>
<textarea id="adContent" cols="20" rows="2" class="ckeditor"></textarea>


<script type="text/javascript">

    mini.parse();

    var editor = CKEDITOR.replace('adContent');

    function SetData(e) {
        var f = mini.clone(e);
        if (f.NContent != "undefined")
            editor.setData(f.NContent);
    }

    function GetData() {
        return editor.getData();
    }

    function add() {
        CloseWindow("ok");
    }

    function close() {
        CloseWindow("cancel");
    }

    function CloseWindow(action) {
        if (window.CloseOwnerWindow)
            return window.CloseOwnerWindow(action);
        else
            window.close();
    }


</script>
